const koa = require('koa')
const app = new koa()
// const {
//   readFile
// } = require('fs')
const path = require('path')
const koaStatic = require('koa-static')

// app.use(async (ctx, next) => {
//   ctx.type = "text/html; utf-8"
//   let content = await new Promise((res, rej) => {
//     readFile(resolve(__dirname, './html/index.html'), (err, byt) => {
//       res(byt)
//     })
//   })
//   ctx.body = content
// })
app.use(koaStatic(path.resolve(__dirname, './')))
app.listen(4455, () => {
  console.log('run on 4455')
})